#define _CRT_SECURE_NO_WARNINGS
#include"mystring.h"

void test1()
{

	hs1::string str("guet.com");

	for (char ch : str)
	{
		cout << ch;
	}
	cout << endl;

	hs1::string::iterator it = str.begin();
	while (it != str.end())
	{
		cout << *it << " ";
		++it;
	}
	cout << endl;
	str.push_back('a');
	str.push_back('a');
	str.push_back('a');
	str.push_back('a');
	cout << str.c_str() << endl;
	str.append("hiworld");
	cout << str.c_str();


}

void test2()
{
	hs1::string str("");


	str.insert(0, 'a');
	str.insert(1, "hello");
	cout << str.c_str() << endl;
	str.erase(1, 3);
	cout << str.c_str() <<" "<<str.size()<< endl;


}

void test3()
{
	hs1::string str("hello");
	str += " bite";
	hs1::string s = str;
	cout << s.c_str()<<endl;

	cout << s.find('e', 0);
	cout << s<<endl;

	cin >> s;
	cout << s;

}
void test4()
{

	hs1::string s1("helloxx");
	hs1::string s2("hellox");
	cout << (s1 < s2) << endl;

}

void test5()
{

	hs1::string s1("heelo");
	cout << s1 << endl;
	s1.resize(10, 'c');
	cout << s1<<endl;

}

void test6()
{
	hs1::string s1("hello");
	hs1::string s2("helloa");
	//s1.swap(s2);
	cout << (s1 == s2) << endl;
	cout << (s1 <= s2) << endl;
	cout << (s1 >= s2) << endl;
	cout << (s1 > s2) << endl;
	cout << (s1 < s2) << endl;


}


int main()
{
	
	test6();

	return 0;
}

